﻿namespace FR.SAFTAnalyserLite
{
    using System.Windows.Input;

    public class AppCommand
    {
        #region Static Constructor (Constructs static application commands)
        /// <summary>
        /// Define custom commands and their key gestures
        /// </summary>
        static AppCommand()
        {
            InputGestureCollection inputs = null;

            inputs = new InputGestureCollection();
            inputs.Add(new KeyGesture(Key.O, ModifierKeys.Control, "Ctrl+O"));
            AppCommand.LoadSAFT = new RoutedUICommand("Load SAF-T PT", "LoadSAFT", typeof(AppCommand));

            AppCommand.LoadPublicKeyFile = new RoutedUICommand("Load PublicKey File", "LoadPublicKeyFile", typeof(AppCommand));

            AppCommand.LoadPrivateKeyFile = new RoutedUICommand("Load PrivateKey File", "LoadPrivateKeyFile", typeof(AppCommand));

            inputs = new InputGestureCollection();
            inputs.Add(new KeyGesture(Key.F4, ModifierKeys.Alt, "Alt+F4"));
            AppCommand.Exit = new RoutedUICommand("Exit", "Exit", typeof(AppCommand), inputs);
        }
        #endregion Static Constructor

        #region CommandFramwork Properties (Exposes Commands to which the UI can bind to)
        /// <summary>Execute exit command.</summary>
        public static RoutedUICommand Exit { get; private set; }

        /// <summary>Execute file open command (without user interaction)</summary>
        public static RoutedUICommand LoadSAFT { get; private set; }

        public static RoutedUICommand LoadPrivateKeyFile { get; private set; }

        public static RoutedUICommand LoadPublicKeyFile { get; private set; }
        #endregion CommandFramwork_Properties
    }
}
